﻿using Camc.Quality.RecordTable.FormBase;
using Camc.Quality.RecordTable.FormClass;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Camc.Quality.RecordTable.FormEntity
{
    public class 状态检查表 : TableBase
    {
        public 状态检查表(int serialNum, Guid workStepEntityId, Guid processesEntityId, int sort, string recordElement)
        {
            SerialNum = serialNum;
            WorkStepEntityId = workStepEntityId;
            ProcessesEntityId = processesEntityId;
            Sort = sort;

            RecordElement = recordElement;
        }
        public override string FormName { get; protected set; } = "状态检查表";

        public override string RecordElement_DisplayName { get; protected set; } = "确认项目";
        public override bool RecordElement_Show { get; protected set; } = true;
        /// <summary>
        /// 实测值
        /// </summary>
        /// <param name="measuredValues"></param>
        public MeasuredResultEntity SetMeasuredResult(MeasuredResultEntity entity, string confirmResult)
        {
            entity.SetConfirmResult(confirmResult, "确认结果", true, true, 0);
            return entity;
        }
        public RecordRequirementsEntity SetRecordRequirements(RecordRequirementsEntity entity,string recordRequire)
        {
            entity.SetRecordRequire(recordRequire, "部门", false, true, 0);
            return entity;
        }
        public InspectionSignatureEntity SetInspectionSignature(InspectionSignatureEntity entity)
        {
            entity.InspectionSignatureName = "一检";
            entity.SetFirstOperator(null, "确认者", true, true, 0, null, "确认者操作时间", true, true, 0);
            return entity;
        }
    }
}
